package top.juntower.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.juntower.dao.CommentMapper;
import top.juntower.pojo.Comment;
import top.juntower.pojo.ReplyComments;
import top.juntower.pojo.vo.CommentVo;
import top.juntower.pojo.vo.GameComment;
import top.juntower.pojo.vo.ReplyCommentsVo;
import top.juntower.service.CommentService;

import java.util.List;
import java.util.Map;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public int addComment(Map map) {
        return commentMapper.addComment(map);
    }

    @Override
    public Double cscore(Integer giId) {
        return commentMapper.cscore(giId);
    }

    @Override
    public int updateCscore(Integer giId, Double cScore) {
        return commentMapper.updateCscore(giId, cScore);
    }

    @Override
    public String isComment(Map map) {
        return commentMapper.isComment(map);
    }

    @Override
    public List<Comment> commentNew(Integer giId, Integer uId, Integer pageNum, Integer pageSize) {
        return commentMapper.commentNew(giId, uId, pageNum, pageSize);
    }

    @Override
    public List<Comment> iscommentNew(Integer giId, Integer pageNum, Integer pageSize) {
        return commentMapper.iscommentNew(giId, pageNum, pageSize);
    }

    @Override
    public List<Comment> commentHot(Integer giId, Integer uId, Integer pageNum, Integer pageSize) {
        return commentMapper.commentHot(giId, uId, pageNum, pageSize);
    }

    @Override
    public List<Comment> iscommentHot(Integer giId, Integer pageNum, Integer pageSize) {
        return commentMapper.iscommentHot(giId, pageNum, pageSize);
    }

    @Override
    public String isCommentm(Map map) {
        return commentMapper.isCommentm(map);
    }

    @Override
    public int insertCommentm(Map map) {
        return commentMapper.insertCommentm(map);
    }

    @Override
    public int updateComment(Map map) {
        return commentMapper.updateComment(map);
    }

    @Override
    public int updateComment1(Map map) {
        return commentMapper.updateComment1(map);
    }

    @Override
    public int updateCmState(Map map) {
        return commentMapper.updateCmState(map);
    }

    @Override
    public int addGamereview(Map map) {
        return commentMapper.addGamereview(map);
    }

    @Override
    public List<ReplyComments> replyComments(Integer cId, Integer pageNum, Integer pageSize) {
        return commentMapper.replyComments(cId, pageNum, pageSize);
    }

    @Override
    public List<CommentVo> MyComments(Integer uId, Integer pageNum, Integer pageSize) {
        return commentMapper.MyComments(uId,pageNum,pageSize);
    }

    @Override
    public List<ReplyCommentsVo> myReplyComments(Integer uId, Integer pageNum, Integer pageSize) {
        return commentMapper.myReplyComments(uId, pageNum, pageSize);
    }

    @Override
    public GameComment myGameComment(Integer giId, Integer uId) {
        return commentMapper.myGameComment(giId, uId);
    }

    @Override
    public int delComment(Integer cId) {
        return commentMapper.delComment(cId);
    }

    @Override
    public int delCommentm(Integer cId) {
        return commentMapper.delCommentm(cId);
    }

    @Override
    public int updComment(Map map) {
        return commentMapper.updComment(map);
    }


}
